<template>
  <div class="editor-wrapper">
    <div class="editor-tool">
      工具栏
    </div>
    <div class="editor-md">
      <div class="editor-md-left">
        <textarea v-model="value" />
      </div>
      <div class="editor-md-right">{{ pvalue }}</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      value: ''
    }
  },
  computed: {
    pvalue: function() {
      let res = ''
      if (this.value.indexOf('\br') === -1) {
        res = '111111111'
      }
      return res
    }
  }
}
</script>
<style lang="scss" scoped>
.editor-wrapper {
  width: 100%;
  height: 100%;
  .editor-tool {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e0e1e2;
  }
  .editor-md {
    height: calc(100% - 60px);
    display: flex;
    &-left {
      width: 50%;
      height: 100%;
      padding: 20px;
      background: #f5f5f5;
      textarea {
        width: 100%;
        height: 100%;
        resize: none;
        border: none;
        background: #f5f5f5;
        outline: none;
      }
    }
    &-right {
      width: 50%;
      height: 100%;
      padding: 20px;
      background: #fff;
    }
  }
}
</style>
